#ifndef model
#define model

#include "bst.h"
#include "stack.h"

/*Soldier structure*/
typedef struct
{
	char *name;  //primary key
	int  experience;
	char *rank;
	char *division;
	char *jobCat;
} SOLDIER;

/*HASH structure*/
typedef struct
{
	int remove; //to determine whether or not the data has been removed from array, 1 for removed, 0 otherwise
	int probe;
	SOLDIER *pSoldier;	
} HASH;

typedef struct
{
	int   count;
	BST   *pTree;
	STACK *pStack;
	HASH  *pHash;
}HEAD_NODE;

SOLDIER   *createSoldier (char bufName[], int bufExp, char rank[], char div[], char jobCat[]);
char      *allocateString(const char *str);
void      createHeadNode(HEAD_NODE *headNode, HASH *hash, BST *bst, STACK *stack);
HEAD_NODE *iniHeadNode(void);

#endif